let str: string = 'hello world';
// 数字类型 123、123.22、0b1010、0o744、0xff、NaN、Infinity
let num: number = 1
let boo: boolean = true
let n: null = null
let ud: undefined = undefined
// let v: void = null
let v: void = undefined
let a: any = 1
let u: unknown = 1

//console.log(str, num, boo, n, ud, v)

interface Person {
    name: string,
    age: number,
    phone?: string,
    readonly eat: (str: string) => void
}

const p1: Person = {
    name: "chj",
    age: 33,
    eat: (str: string) => {
        console.log(`eat ${str}`)
    }
}

console.log(p1)
p1.eat('kfc')

interface Fn {
    (num: number): string[]
}

const fn: Fn = (num: number) => [`${num}`]
console.log(fn(2))
